package com.treasure.mall.biz.service.core.pay;

import com.treasure.mall.biz.base.SearchableCrudService;
import com.treasure.mall.biz.entity.order.AfterSaleBillPO;
import com.treasure.mall.biz.entity.order.BizOrderPO;
import com.treasure.mall.biz.entity.pay.RefundBillPO;
import com.treasure.mall.zbq.common.ienum.order.OrderEnums;

import java.math.BigDecimal;
import java.util.List;

/**
 * @author allan
 * @version 1.0.0
 * @date 2020/6/14
 */
public interface RefundBillService extends SearchableCrudService<RefundBillPO, String> {
    RefundBillPO create(AfterSaleBillPO afterSaleBillPO, BigDecimal amount, OrderEnums.RefundType refundType);

    RefundBillPO create(BizOrderPO orderPO, BigDecimal amount, OrderEnums.RefundType refundType);

    List<RefundBillPO> findByOrder(String subOrderId);

    /**
     * 得到第三方退款退款单
     *
     * @param subOrderId
     * @return
     */
    RefundBillPO findThirdRefund(String subOrderId);

    /**
     * 得到账户退款单
     *
     * @param subOrderId
     * @return
     */
    List<RefundBillPO> findUserRefund(String subOrderId);
}
